package com.example.fill.output;

import android.text.TextUtils;

import java.util.function.Function;

public class OutputBeanWrapper<T> {

    private Function<T, Object> methodFunction = null;
    private String columnName = "";
    private String patternTrans = null;

    public OutputBeanWrapper(Function<T, Object> methodFunction, String columnName) {
        this.methodFunction = methodFunction;
        this.columnName = columnName;
    }

    public OutputBeanWrapper(Function<T, Object> methodFunction, String columnName, String patternTrans) {
        this.methodFunction = methodFunction;
        this.columnName = columnName;
        this.patternTrans = patternTrans;
    }

    public boolean needTransform(){
        return !TextUtils.isEmpty(patternTrans);
    }

    public Function<T, Object> getMethodFunction() {
        return methodFunction;
    }

    public String getColumnName() {
        return columnName;
    }

    public String getPatternTrans() {
        return patternTrans;
    }
}
